<?php

namespace Database\Seeders;

use App\Models\Task;
use App\Models\Team;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\Date;

class TaskSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $team = Team::find(1);
        $team->tasks()->create([
            'name' => 'Сделать новую модель',
            'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut',
            'responsible_id' => 1,
            'due_date' => Date::createFromDate(2022, 10, 3),
            'status_id' => 1
        ]);
        $team->tasks()->create([
            'name' => 'Сделать домашку по машинному обучению',
            'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut',
            'responsible_id' => 1,
            'due_date' => Date::createFromDate(2022, 10, 3),
            'status_id' => 1
        ]);
        $team->tasks()->create([
            'name' => 'Описать лендинг',
            'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut',
            'responsible_id' => 1,
            'due_date' => Date::createFromDate(2022, 10, 3),
            'status_id' => 1
        ]);
    }
}
